package GenericStudy.Exa4;

/**
 * 泛型接口学习
 */
public class GenericComparisonTest {
    public static void main(String[] args) {
        Integer[] books = { 4, 5, 2, 1,5,7,1};
        System.out.println("初始数组：");
        for (Integer book : books) {
            System.out.print(book+" ");
        }
        System.out.println();
        GenericComparison<Integer> gc = new GenericComparison<Integer>();
        System.out.println("最小值");
        Integer min=gc.getMin(books);
        System.out.println(min);
        Integer max = gc.getMax(books);
        System.out.println("最大值：");
        System.out.println(max);
        Integer[] result1=gc.sorted(books);
        System.out.println("升序排序后：");
       for(Integer a:result1){
           System.out.print(a+ " ");
       }

    }
}

